package com.lingjtx.common.core.token;

import com.alibaba.fastjson2.annotation.JSONField;
import com.lingjtx.common.core.annotation.Sensitive;
import com.lingjtx.common.core.constant.SensitiveType;

import java.util.List;

public class UserVo {

    private String token;

    private Long userId;

    private Long companyId;

    private String nickname;

    private String avatar;

    @Sensitive(type = SensitiveType.MOBILE_PHONE)
    private String mobile;

    @JSONField(serialize = false)
    private String userPsw;

    @Sensitive(type = SensitiveType.EMAIL)
    private String email;

    private String wxOpenid;

    private Byte adminAccount;

    // 认证状态：0-不通过；1-已认证；2-审核中
    private Byte certificationStatus;

    private String userType;

    private List<String> perms;

    // 1-仅自己，2-本部门，3-自定义，4-全部（数据范围权限从小到大，当该用户有多角色的时候，数据权限选择最大的）
    private Byte scopeType;

    private List<Long> scopeList; // 数据权限，组织/公司/部门的集合

    @JSONField(serialize = false)
    private String sqlWhere;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getUserPsw() {
        return userPsw;
    }

    public void setUserPsw(String userPsw) {
        this.userPsw = userPsw;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWxOpenid() {
        return wxOpenid;
    }

    public void setWxOpenid(String wxOpenid) {
        this.wxOpenid = wxOpenid;
    }

    public Byte getAdminAccount() {
        return adminAccount;
    }

    public void setAdminAccount(Byte adminAccount) {
        this.adminAccount = adminAccount;
    }

    public Byte getCertificationStatus() {
        return certificationStatus;
    }

    public void setCertificationStatus(Byte certificationStatus) {
        this.certificationStatus = certificationStatus;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public List<String> getPerms() {
        return perms;
    }

    public void setPerms(List<String> perms) {
        this.perms = perms;
    }

    public Byte getScopeType() {
        return scopeType;
    }

    public void setScopeType(Byte scopeType) {
        this.scopeType = scopeType;
    }

    public List<Long> getScopeList() {
        return scopeList;
    }

    public void setScopeList(List<Long> scopeList) {
        this.scopeList = scopeList;
    }

    public String getSqlWhere() {
        return sqlWhere;
    }

    public void setSqlWhere(String sqlWhere) {
        this.sqlWhere = sqlWhere;
    }
}
